Repository navigation
docs(jwt): what else changes from 4.2 to 4.3, after a backward compatibility audit - #37
Merged
Merged
Conversation
…ibility audit An audit of 4.3.x against 4.2.7, with the Symfony backward compatibility promise as the reference, found changes that the migration guide did not mention, or described wrongly. Behaviour changes: - the builders report some errors in build(): the checks of JWEBuilder and the b64 consistency of JWSBuilder, with the same messages and classes, or subclasses of them; - create() returns a new, empty builder and no longer empties the one it is called on; - the loaders of the library and of the bundle return the interfaces of their verifier, decrypter and header checker manager, which static analysers notice; - AlgorithmAnalyzer reports a key whose "alg" is "EdDSA" with a medium message. Corrections: - the deprecated Services classes of the bundle are still the services in 4.3: the EventDispatching decorators replace them in 5.0, under the same ids. The guide said they already did; - JKUFactory and X5UFactory extend UrlKeySetFactory again (web-token/jwt-framework#821), and stop extending it in 5.0; - the bundle keeps the services of the library "none" and "RSA1_5" classes, deprecated (web-token/jwt-framework#822); - the split packages are updated together, since the bundle and the experimental package require the library 4.3 (web-token/jwt-framework#820).
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backward compatibility audit of web-token/jwt-framework 4.3.x against 4.2.7 found changes that the migration guide (
projects/jwt/4.3/docs/migration/from-v4.2-to-v4.3.md) did not mention, and one row that was wrong. This PR only touches that page.Behaviour changes added
build(): the header, algorithm and key checks ofJWEBuilder, and theb64consistency ofJWSBuilder. The messages are unchanged, and the classes are the ones thrown before or subclasses of them, so atryblock around the whole sequence still catches them. Atryblock around the single call that used to throw no longer does.create(). It returns a new, empty builder and no longer empties the builder it is called on.$builder->create();with the result ignored now keeps the earlier signatures or recipients.getJwsVerifier(),getJweDecrypter()andgetHeaderCheckerManager(). Nothing changes at runtime, but static analysers report calls to the deprecated methods.AlgorithmAnalyzeradds amediummessage to a key withalg: EdDSA.Corrections
EventDispatching*decorators were already registered under the same service ids. In 4.3 the bundle still creates the deprecatedServicesclasses; the decorators replace them in 5.0, as planned in 5.0.0: remove what 4.3 deprecated, seal what it announced web-token/jwt-framework#717.Changes that depend on open PRs
These parts of the page only become true once the matching PR is merged into 4.3.x:
JKUFactoryandX5UFactorystill extendUrlKeySetFactoryin 4.3, without running its code, and stop extending it in 5.0.noneandRSA1_5classes, deprecated and untagged, like the experimentalES256Kone.Verification
create()behaviours were checked with a probe on 4.2.7 and on 4.3.x (e39db7ef), and the analyzer message against the 4.3.x code.tools/build.py --strict --only jwtpasses (342 pages), and the anchors used by the new links exist in the built page.